package Demo;

public class Demo1 {
    public static void main(String[] args) {
        Thread t = new Thread(() ->{
            System.out.println("11");
        },"myThread");
        System.out.println("线程的状态: "+t.getState());
        t.start();
        System.out.println("线程的状态: "+t.getState());
        try {
            t.join();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("线程的状态: "+t.getState());
    }
}
